package domainspecific;

import java.util.Date;

import javax.jws.WebParam;
import javax.jws.WebService;

import domainspecific.service.MeterReadingService;
import domainspecific.types.Interval;
import domainspecific.types.MeterReadings;
import domainspecific.types.MultipleMeterReadings;

/**
 * This service demonstrates the design of a domain specific Web services, with explicit domain related types.
 * @author Markus Jung
 */
@WebService(name="MeterReadingsService", targetNamespace="http://meterreadingservie")
public class MeterReadingsServiceImpl implements MeterReadingService{

	/**
	 * Returns the meter readings for a certain meter ID.
	 */
	public MeterReadings getMeterReadings(@WebParam(name="meterID") int meterID, @WebParam(name="from") long from,@WebParam(name="numReadings") long numReadings,
			@WebParam(name="interval") Interval interval) {		
		return new MeterReadings(numReadings);
	}

	/**
	 * Returns all meter readings for a customer. One customer may have multiple meters installed.
	 */
	public MultipleMeterReadings getCustomerMeterReadings(@WebParam(name="meterID") String customerID, @WebParam(name="from") long from,@WebParam(name="to") long to,
			@WebParam(name="interval") Interval interval) {
		return new MultipleMeterReadings();
	}
}
